<!DOCTYPE HTML>
<html>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<head>
  <meta charset="UTF-8">

  <meta name="description" content="">
  <meta name="keywords" content="">

  <title>文艺书苑</title>

  <link rel="shortcut icon" href="favicon.ico">
  <link href="css/style.css" media="screen" rel="stylesheet" type="text/css">
  <link href="css/grid.css" media="screen" rel="stylesheet" type="text/css">

        <script src="js/jquery-1.7.2.min.js" ></script>
         <script src="js/html5.js" ></script>
         <script src="js/jflow.plus.js" ></script>
        <script src="js/jquery.carouFredSel-5.2.2-packed.js"></script>
    <script type="application/javascript" src="js/ajax.js"></script>

  <script>
	$(document).ready(function(){
	    $("#myController").jFlow({
			controller: ".control", // must be class, use . sign
			slideWrapper : "#jFlowSlider", // must be id, use # sign
			slides: "#slider",  // the div where all your sliding divs are nested in
			selectedWrapper: "jFlowSelected",  // just pure text, no sign
			width: "984px",  // this is the width for the content-slider
			height: "450px",  // this is the height for the content-slider
			duration: 400,  // time in miliseconds to transition one slide
			prev: ".slidprev", // must be class, use . sign
			next: ".slidnext", // must be class, use . sign
			auto: true
    });
  });
  </script>
  <script>
	$(function() {
	  $('#list_product').carouFredSel({
		prev: '#prev_c1',
		next: '#next_c1',
		auto: false
	  });
          $('#list_product2').carouFredSel({
		prev: '#prev_c2',
		next: '#next_c2',
		auto: false
	  });
	  $(window).resize();
	});
  </script>
  <script>
       $(document).ready(function(){
	      $("button").click(function(){
		     $(this).addClass('click')
	      });
       })
  </script>
  <!-- AJAX数据传输 -->

</head>
<body>
  <div class="container_12">

    <header id="branding">
      <div class="grid_3">
        <hgroup>
          <h1 id="site_logo" ><a href="index.php" title=""><img src="images/logo.png" alt="Online Store Theme Logo"/></a></h1>
          <h2 id="site_description">长江文艺出版社</h2>
        </hgroup>
      </div><!-- .grid_3 -->

      <div class="grid_3">
        <form class="search" action="search_result.php">
          <input type="text" name="search" class="entry_form" value="" placeholder="输入关键词..."/>
	      </form>
      </div><!-- .grid_3 -->
<!-- 购物车简要 -->
      <div class="grid_6">
        <ul id="cart_nav">
          <li>
            <a class="cart_li" href="#">我的购物车</a>
            <ul class="cart_cont">

                <?php
                include_once("server/CartInfo_nav.php");
                $shops_nav = getCart_forBox();
                if ($shops_nav == false){
                    echo "
                          <li>
                            <a href=\"#\" class=\"prev_cart\"><div class=\"cart_vert\"><img src=\"book_pic/none.png\" alt=\"\" title=\"\" /></div></a>
                            <div class=\"cont_cart\">
                              <h4>None</h4>
                              <div class=\"price\">&nbsp;None</div>
                            </div>
                            <div class=\"clear\"></div>
                          </li>
                        ";
                }else{
                    while ($row_nav = $shops_nav->fetch_row()){
                        echo "
                              <li>
                                <a href=\"product_page.php?id=$row_nav[0]\" class=\"prev_cart\"><div class=\"cart_vert\"><img src=\"book_pic/$row_nav[0].jpg\" alt=\"\" title=\"\" /></div></a>
                                <div class=\"cont_cart\">
                                  <h4>《$row_nav[1]》</h4>
                                  <div class=\"price\">&nbsp;￥$row_nav[2]</div>
                                </div>
                                <div class=\"clear\"></div>
                              </li>
                            ";
                    }
                }
                ?>

      	      <li class="no_border">
            		<a href="shopping_cart.php" class="view_cart">查看购物车</a>
            		<a href="pay_order.php" class="checkout">立即购买</a>
      	      </li>
            </ul>
          </li>
        </ul>

        <nav class="private">
          <ul>
            <li><a href="#" id="myAccount">用户名</a></li>
		    <li class="separator">|</li>
            <li><a href="#">收藏夹</a></li>
		        <li class="separator">|</li>
            <li><a href="login.php" id="user_state" onclick="user_quiz()">登 录</a></li>  <!--登录后改为退出二字-->
          </ul>
        </nav><!-- .private -->
      </div><!-- .grid_6 -->
    </header><!-- #branding -->
<div class="clear"></div>
  </div><!-- .container_12 -->
<!-- 导航栏 -->
  <div id="block_nav_primary">
    <div class="container_12">
      <div class="grid_12">
        <nav class="primary">
          <ul>
            <li class="curent"><a href="index.php">书苑主页</a></li>

	        <li><a href="press_intro.php">长江简介</a></li>
	        <li><a href="news_list.php">新闻动态</a></li>
	        <li><a href="#">图书商城 </a>
			<ul class="sub">
                <li><a href="book_all.php">全部图书</a></li>
                <li><a href="book_catalog.php">分类浏览</a></li>
            </ul>
           </li>
            <li><a href="contact_us.php">联系我们</a></li>
          </ul>
        </nav><!-- .primary -->
      </div><!-- .grid_12 -->
    </div><!-- .container_12 -->
  </div><!-- .block_nav_primary -->

  <div class="clear"></div>
<!-- 大banner中的文字 -->
  <div class="container_12">
    <div class="grid_12">
        <div class="slidprev"><span>Prev</span></div>
        <div class="slidnext"><span>Next</span></div>
        <div id="slider">
          <div id="slide1">
              <a href="product_page.php?id=1016"><img src="images/content/3.jpg" alt="" title="" /></a>
          </div>

          <div id="slide2">
              <a href="product_page.php?id=1017"><img src="images/content/2.jpg" alt="" title="" /></a>
          </div>

          <div id="slide3">
              <a href="product_page.php?id=1018"><img src="images/content/1.jpg" alt="" title="" /></a>
          </div>
        </div><!-- .slider -->
        <div id="myController">
          <div class="control"><span>1</span></div>
          <div class="control"><span>2</span></div>
          <div class="control"><span>3</span></div>
        </div>
    </div><!-- .grid_12 -->
  </div>
  <!-- .container_12 -->
  <div class="clear"></div>
<!-- 畅销榜 -->
  <section id="main" class="home">
    <div class="container_12">
      <div class="clear"></div>

      <div class="carousel">
        <div class="c_header">
          <div class="grid_10">
            <h2>畅销榜</h2>
          </div>

          <div class="grid_2">
            <a id="next_c1" class="next arows" href="#"><span>Next</span></a>
            <a id="prev_c1" class="prev arows" href="#"><span>Prev</span></a>
           </div>
        </div><!-- .c_header -->

        <div class="list_carousel">

        <ul id="list_product" class="list_product">

            <?php
                include ("server/sale_good_book.php");

                $sales =  getIndexBooks($con,1);

                foreach ($sales as $sale_row){
            ?>
                    <li class="">
                        <div class="grid_3 product">
                            <div class="prev">
                                <a href="product_page.php?id=<?php echo $sale_row['id'] ?>"><img src="book_pic/<?php echo $sale_row['id'] ?>.jpg" alt="" title="" /></a>
                            </div><!-- .prev -->
                            <h3 class="title"><?php echo $sale_row['name'] ?></h3>
                            <div class="cart">
                                <div class="price">
                                    <div class="vert">
                                        <div class="price_new">￥<?php echo $sale_row['price'] ?></div>
                                    </div>
                                </div>

                                <a href="#" class="like"></a>
                                <a class="bay" id="<?php echo $sale_row['id']; ?>" onclick="addToCart_btn(this)"></a>
                            </div><!-- .cart -->
                        </div><!-- .grid_3 -->
                    </li>
            <?php
            }
            ?>

        </ul><!-- #list_product -->
        </div><!-- .list_carousel -->
      </div><!-- .carousel -->
<!-- 好评榜单 -->
      <div class="carousel">
        <div class="c_header">
          <div class="grid_10">
            <h2>好评榜</h2>
          </div><!-- .grid_10 -->

          <div class="grid_2">
            <a id="next_c2" class="next arows" href="#"><span>Next</span></a>
            <a id="prev_c2" class="prev arows" href="#"><span>Prev</span></a>
          </div><!-- .grid_2 -->
        </div><!-- .c_header -->

        <div class="list_carousel">
        <ul id="list_product2" class="list_product">
            <?php
                $wells = getIndexBooks($con,2);

                    foreach ($wells as $sale_row){
            ?>
                <li class="">
                    <div class="grid_3 product">
                        <div class="prev">
                            <a href="product_page.php?id=<?php echo $sale_row['id'] ?>"><img src="book_pic/<?php echo $sale_row['id'] ?>.jpg" alt="" title="" /></a>
                        </div><!-- .prev -->
                        <h3 class="title"><?php echo $sale_row['name'] ?></h3>
                        <div class="cart">
                            <div class="price">
                                <div class="vert">
                                    <div class="price_new">￥<?php echo $sale_row['price'] ?></div>
                                </div>
                            </div>

                            <a href="#" class="like"></a>
                            <a class="bay" id="<?php echo $sale_row['id']; ?>" onclick="addToCart_btn(this)"></a>
                        </div><!-- .cart -->
                    </div><!-- .grid_3 -->
                </li>
            <?php
                }
            ?>

        </ul><!-- #list_product2 -->
        </div><!-- .list_carousel -->
      </div><!-- .carousel -->

      
      <div class="clear"></div>

    </div><!-- .container_12 -->
  </section><!-- #main -->

   <!-- 底部信息 -->
  <footer>
    <div class="f_navigation">
      <div class="container_12">
        <div class="grid_3">
          <h3>联系我们</h3>
          <ul class="f_contact">
            <li>湖北省武汉市雄楚大街268号</li>
            <li>+86 027-87679307</li>
            <li>cjwytgc@163.com</li>
          </ul><!-- .f_contact -->
        </div><!-- .grid_3 -->
      
        <div class="grid_3">
          <h3>信息服务</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="press_intro.php">关于我们</a></li>
              <li><a href="#">用户协议</a></li>
              <li><a href="#">意见反馈</a></li>
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->
        
        <div class="grid_3">
          <h3>网站服务</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="contact_us.php">联系我们</a></li>
              <li><a href="#">常见问题</a></li>
              <li><a href="#">网站地图</a></li>
              
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->
        
        <div class="grid_3">
          <h3>购物指南</h3>
          <nav class="f_menu">
            <ul>
              <li><a href="#">支付方式</a></li>
              <li><a href="#">配送方式</a></li>
              <li><a href="#">售后政策</a></li>
              
            </ul>
          </nav><!-- .private -->
        </div><!-- .grid_3 -->    
      </div><!-- .container_12 -->
    </div><!-- .f_navigation -->
  </footer>
</body>
</html>
